home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr11 / pdox693.zip / TI521.ASC < prev    next >
Text File  |  1992-08-12  |  1KB  |  67 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.   PRODUCT  :  PARADOX                                NUMBER  :  521
  9.   VERSION  :  ALL
  10.        OS  :  DOS
  11.      DATE  :  August 12, 1992                          PAGE  :  1/1
  12.  
  13.     TITLE  :  Adding the leading zeros to a zipcode field
  14.  
  15.  
  16.  
  17.  
  18.   The following script demonstrates how to add leading zeros to
  19.   zipcode fields that are formatted as numeric data types.  The
  20.   script first restructures the field to "A10".  The next step is
  21.   to perform a ChangeTo query on the zipcode field for all records
  22.   that only have four numbers and all records that only have three
  23.   numbers.
  24.  
  25.  
  26.   Menu {Modify} {Restructure} {ZIPCODE}
  27.           ; ZIPCODE is the table name
  28.   MOVETO [Field Name]
  29.   LOCATE "ZIP"
  30.           ; ZIP is the field name
  31.   Right CtrlBackspace TYPEIN "A10" Enter
  32.   Do_It!
  33.  
  34.   Query
  35.  
  36.    Zipcode |            Zip                |
  37.            | _4, @@@@, changeto "0"+_4     |
  38.            | _3, @@@, changeto "00"+_3     |
  39.            |                               |
  40.  
  41.   EndQuery
  42.  
  43.  
  44.   DISCLAIMER: You have the right to use this technical information
  45.   subject to the terms of the No-Nonsense License Statement that
  46.   you received with the Borland product to which this information
  47.   pertains.
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.